package com.qf.fmall2203.ex;

import com.qf.fmall2203.utils.ResultVo;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;


@RestControllerAdvice
public class MyRestExHandler {


    @ExceptionHandler(Exception.class)
    public ResultVo stockNotEnough(Exception exception){

        return ResultVo.error(exception.getMessage());
    }



}
